/* helpers */
static void
-cst_add_wpt(const route_head* track, Waypoint* wpt)
+cst_add_wpt(route_head* track, Waypoint* wpt)
{
if ((wpt == nullptr) || (track == nullptr)) {
return;
}
route_add_wpt(temp_route, new Waypoint(*wpt));
}
- track_add_wpt(const_cast<route_head*>(track), wpt);
+ track_add_wpt(track, wpt);
}
static char*
static uint16_t pos_object_id;
static uint16_t txt_object_id;
static gpsdata_type mmo_datatype;
-static route_head* mmo_rte;
+static const route_head* mmo_rte;
static QHash<QString, int> category_names;
static QHash<int, QString> icons;
return;
}
- mmo_rte = const_cast<route_head*>(rte);
+ mmo_rte = rte;
QUEUE_FOR_EACH(&rte->waypoint_list, elem, tmp) {
Waypoint* wpt = (Waypoint*)elem;
static void
enum_waypt_cb(const Waypoint* wpt)
{
- register_waypt(const_cast<Waypoint*>(wpt), 0);
+ register_waypt(wpt, 0);
}
static void
enum_rtept_cb(const Waypoint* wpt)
{
- register_waypt(const_cast<Waypoint*>(wpt), 1);
+ register_waypt(wpt, 1);
}
static int
static QString rte_name;
static QString rte_desc;
-static Waypoint* trkpt_out;
-static route_head* trk_out;
+static const Waypoint* trkpt_out;
+static const route_head* trk_out;
static double trkpt_dist;
static double minalt, maxalt, maxspeed;
rte_desc = trk->rte_desc;
}
- trk_out = const_cast<route_head*>(trk);
+ trk_out = trk;
}
static void
this_time += (wpt->GetCreationTime().toTime_t() - trkpt_out->GetCreationTime().toTime_t());
}
- trkpt_out = const_cast<Waypoint*>(wpt);
+ trkpt_out = wpt;
}
static void
{
track_index++;
track_points = 0;
- trk_out = const_cast<route_head*>(trk);
+ trk_out = trk;
trkpt_out = nullptr;
}
gbfprintf(fout, ",0\n");
}
- trkpt_out = const_cast<Waypoint*>(wpt);
+ trkpt_out = wpt;
}
static void
static char
unicsv_compare_fields(const char* s, const field_t* f)
{
- char* name = const_cast<char*>(f->name);
+ const char* name = f->name;
const char* test = s;
char result;